<!--设置考场位数-->
<template>
  <div class="wrapper-container">
    <div
      class="search-container"
      style="justify-content: space-between !important;margin-top: 0px !important;"
    >
      <div class="search-container">
        <SelectItem
          :name="'学期'"
          :value="xq"
          @change="
            (e) => {
              xq = e;
            }
          "
          :xqList="xqList"
        ></SelectItem>
        <InputItem
          :name="'场地名称'"
          :value="address"
          @input="
            (e) => {
              address = e;
            }
          "
        ></InputItem>
        <div style="color: #004ca7;margin-right:20px">
          <span class="item-name">考位数：</span>
          <el-input v-model="num1" style="width: 50px" size="mini"></el-input>
          -
          <el-input v-model="num2" style="width: 50px" size="mini"></el-input>
        </div>
        <SelectItem
          :name="'是否为专业班教室'"
          :value="yesNo"
          @change="
            (e) => {
              yesNo = e;
            }
          "
          :xqList="yesNoList"
        ></SelectItem>
        <div class="search-button" style="margin-right: 25px;">
          <img src="../../../assets/assessment/icon-search.png" alt="" />
          <span>查询</span>
        </div>
      </div>
      <div class="filter-button">
        <ButtonItem
          :name="'获取上学期数据'"
          :link="''"
          :buttonColor="'orange'"
          @click=""
        ></ButtonItem>
        <ButtonItem
          :name="'查看已设考位教室'"
          :link="''"
          :buttonColor="'orange'"
          @click=""
        ></ButtonItem>
      </div>
    </div>
    <div class="table-container">
      <el-table
        :data="tableData"
        border
        style="width: 100%"
        class="table-data"
        row-class-name="row-class"
        cell-class-name="cell-class"
        header-row-class-name="header-row-class"
        header-cell-class-name="header-cell-class"
      >
        <el-table-column prop="building" label="建筑物" align="center">
        </el-table-column>
        <el-table-column prop="siteName" label="场地名称" align="center">
        </el-table-column>
        <el-table-column prop="galleryful" label="容纳人数" align="center">
        </el-table-column>
        <el-table-column
          prop="numberOfTestPlaces"
          label="考位数"
          align="center"
        >
        </el-table-column>
        <el-table-column prop="yesOrNo" label="是否为专业班教室" align="center">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import SelectItem from "../../../components/SelectItem.vue";
import InputItem from "../../../components/InputItem.vue";
import ButtonItem from "../../../components/ButtonItem.vue";
export default {
  components: {
    SelectItem,
    InputItem,
    ButtonItem,
  },
  data() {
    return {
      address: "",
      xq: "2020春",
      xqList: [
        {
          value: "2020春",
          label: "2020春",
        },
        {
          value: "2020夏",
          label: "2020夏",
        },
      ],
      num1: "",
      num2: "",
      yesNo: "是",
      yesNoList: [
        {
          value: "是",
          label: "是",
        },
        {
          value: "否",
          label: "否",
        },
      ],
      tableData: [
        {
          building: "教学楼",
          siteName: "一楼102",
          galleryful: "100",
          numberOfTestPlaces: "203",
          yesOrNo: "是",
        },
        {
          building: "教学楼",
          siteName: "一楼102",
          galleryful: "100",
          numberOfTestPlaces: "203",
          yesOrNo: "是",
        },
        {
          building: "教学楼",
          siteName: "一楼102",
          galleryful: "100",
          numberOfTestPlaces: "203",
          yesOrNo: "是",
        },
      ],
    };
  },
  methods: {
    clickExcel() {
      alert();
    },
  },
};
</script>
<style lang="less" scoped>
.search-container {
  justify-content: flex-start !important;
}

.search-button {
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 27px;
  background: #f1f8fe;
  border: 1px solid #51aef6;
  border-radius: 6px;

  > span {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #51aef6;
  }

  > img {
    width: 19px;
    height: 19px;
    margin-right: 4px;
  }
}

.table-container {
  margin-top: 30px;

  .el-table td,
  .el-table th.is-leaf,
  .el-table--border,
  .el-table--group {
    border-color: #c7d7eb;
  }

  .el-table__header tr,
  .el-table__header th {
    padding: 0;
    height: 76px;
    background-color: #edf2f9;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    line-height: 20px;
    color: #004ca7;
  }

  .el-table__body tr,
  .el-table__body td {
    padding: 0;
    height: 86px;
  }

  .wrapper-button {
    display: flex;
    flex-direction: column;
    align-items: center;

    > div {
      margin-bottom: 8px;
    }
  }
}
</style>

<style lang="less" scoped>
@import "../../../styles/special.less";

.filter-button {
  display: flex;
  margin-top: 27px;
}
.wrapper-container {
  width: 1711px;
  margin: 0 auto;
}
.table-container {
  margin-top: 30px;

  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}

.save-button {
  width: 87px;
  height: 36px;
  line-height: 36px;
  background: #fff6ef;
  border: 1px solid #f3b815;
  border-radius: 6px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #f3b815;
  text-align: center;
  margin: 82px auto;
}

.zuoyou {
  width: 200px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
</style>
